<!DOCTYPE html>
<html>
<head>
    <% include ../common/meta.ejs %>
    <% include ../common/public.ejs %>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=mxtxGf9RLAiXzk9f5PDq8Vhd58HZgSRi"></script>
    <link href="//cdn.bootcss.com/bootstrap-datepicker/1.6.1/css/bootstrap-datepicker.min.css" rel="stylesheet">
    <link href="<%= global.config.publicPath %>/jquery-file-upload/css/jquery.fileupload.css" rel="stylesheet">
    <link href="<%= global.config.publicPath %>/uedit/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">

    <style>
        /*body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}*/
        /* #l-map {
             height: 80px;
             width: 270px;
         }*/


        #r-result {
            width: 100%;
        }
        .input-group-addon {
            padding: 5px 12px;
        }

        .btn.fileinput-button {
            padding: 4px;
            font-size: 14px;
        }

        textarea {
            width: 100%;
        }

        #basicInfoPanel .form-control-static {
            color: #2a2a2a;
        }

        .form-group textarea {
            font-size: 13px;
        }
        .fileinput-del-btn {
            padding: 2px 4px;
            margin-left: 5px;
        }
    </style>
</head>
<body>
<% include ../common/header.ejs %>
<div class="container">
    <div class="dolphin-row main page-content">
        <div class="page-header">
            <h5 class="content-title">公寓管理</h5>
            <div class="pull-left">
                <ul class="fl">
                    <li>
                        <button class="btn btn-block btn-warning newDir"><i class="fui-plus-circle icon-menu"></i>
                            <span>新建目录</span>
                        </button>
                    </li>
                    <li>
                        <button class="btn btn-block btn-info newData"><i class="fui-plus-circle icon-menu"></i>
                            <span>新建公寓</span>
                        </button>
                    </li>
                    <li>
                        <button class="btn btn-block btn-info editData"><i class="fa fa-edit"></i>
                            <span>编辑公寓</span>
                        </button>
                    </li>
                </ul>
            </div>
        </div>
        <div class="dolphin-col-24">
            <div class="dolphin-row">
                <div class="dolphin-col-6">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <div class="panel-title">
                                公寓树
                            </div>
                        </div>
                        <div class="panel-body">
                            <div id="categoryTree"></div>
                        </div>
                    </div>
                </div>
                <div class="dolphin-col-18" id="infoPanel">

                    <div class="queryCondition">
                        <form class="query-form">
                            <div class="row">
                                <div class="col-md-3">
                                    <label>名称：</label>
                                    <input type="text" style="width: 100px;" placeholder="名称模糊查询" name="name_like">
                                </div>
                                <div class="col-md-3">
                                    <label>户型：</label>
                                    <select options="houseType"
                                            codeField="code" nameField="name" name="houseType"
                                            dol-validate="required"></select>
                                </div>
                                <div class="col-md-3">
                                    <label>状态：</label>
                                    <select name="status">
                                        <option value="">--请选择--</option>
                                        <option value="1">空房</option>
                                        <option value="2">已租赁</option>
                                        <option value="3">维修中</option>
                                    </select>
                                </div>
                                <div class="col-md-2">
                                    <button class="btn btn-sm btn-inverse btn-query" type="button">搜索</button>
                                </div>
                            </div>
                        </form>
                    </div>

                    <div id="basicInfoPanel" style="border: 1px solid #eeeeee;margin-bottom: 2px;display: none;">
                        <div class="dolphin-row">
                            <div class="dolphin-col-8">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">
                                        公寓编码
                                    </label>
                                    <div class="col-sm-8">
                                        <span class="form-control-static" name="code"></span>
                                    </div>
                                </div>
                            </div>
                            <div class="dolphin-col-8">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">
                                        公寓名称
                                    </label>
                                    <div class="col-sm-8">
                                        <span class="form-control-static" name="name"></span>
                                    </div>
                                </div>
                            </div>
                            <div class="dolphin-col-8">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">
                                        楼层总数
                                    </label>
                                    <div class="col-sm-8">
                                        <span class="form-control-static" name="totalFloor"></span>
                                    </div>
                                </div>
                            </div>
                            <div class="dolphin-col-8">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">
                                        联系电话
                                    </label>
                                    <div class="col-sm-8">
                                        <span class="form-control-static" name="phone"></span>
                                    </div>
                                </div>
                            </div>
                            <div class="dolphin-col-8">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">
                                        竣工日期
                                    </label>
                                    <div class="col-sm-8">
                                        <span class="form-control-static" name="buildDate"></span>
                                    </div>
                                </div>
                            </div>
                            <div class="dolphin-col-8">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">
                                        启用日期
                                    </label>
                                    <div class="col-sm-8">
                                        <span class="form-control-static" name="startDate"></span>
                                    </div>
                                </div>
                            </div>
                            <div class="dolphin-col-24">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">
                                        公寓地址
                                    </label>
                                    <div class="col-sm-22">
                                        <span class="form-control-static" name="address"></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            <div class="panel-title">
                                <h3 class="panel-title">
                                    <i aria-hidden="true" class="fa fa-table fa-lg"></i>
                                    房屋列表
                                </h3>
                                <div class="operationButton" style="float: right;margin-top:-26px;margin-right: -15px;">
                                    <div class="btn-group float-right" role="group">
                                        <button type="button" class="btn btn-warning btn-sm" id="houseCopy">
                                            <i class="glyphicon glyphicon-copy"></i>
                                            克隆房间
                                        </button>
                                        <button type="button" class="btn btn-success btn-sm" id="houseAdd">
                                            <i class="glyphicon glyphicon-plus-sign"></i>
                                            新增
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="itemList"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="dataModal" tabindex="-1" role="dialog" aria-labelledby="dataModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="dataModalLabel">新增公寓</h4>

            </div>
            <div class="modal-body">
                <form class="form-horizontal edit-form">
                    <input type="hidden" class="form-control" name="parent.id"/>
                    <input type="hidden" class="form-control" name="id">
                    <input type="hidden" class="form-control" name="directory" value="false">
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">公寓名称</label>
                        <div class="col-md-6">
                            <input class="form-control" name="name" type="text" dol-validate="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">公寓编码</label>
                        <div class="col-md-6">
                            <input class="form-control" name="code" type="text" dol-validate="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">所在城市</label>
                        <div class="col-md-6">
                            <select class="form-control" options="cityList"
                                    codeField="code" nameField="name" name="city" dol-validate="required" id="cityList"></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">公寓地址</label>
                        <div class="col-md-6">
                            <input class="form-control" name="address" id="address">
                            <input class="form-control" name="lngAndLat" type="hidden" id="lngAndLat">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">联系电话</label>
                        <div class="col-md-6">
                            <input class="form-control" name="phone" type="text">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">竣工日期</label>
                        <div class="col-md-6">
                            <div class="input-group date dolphin_date_picker" data-date-format="yyyy-mm-dd hh:ii:ss">
                                <input type="text" class="form-control" name="buildDate">
                                <span class="input-group-addon">
                                        <i class="glyphicon glyphicon-th"></i>
                                    </span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">启用日期</label>
                        <div class="col-md-6">
                            <div class="input-group date dolphin_date_picker" data-date-format="yyyy-mm-dd hh:ii:ss">
                                <input type="text" class="form-control" name="startDate">
                                <span class="input-group-addon">
                                        <i class="glyphicon glyphicon-th"></i>
                                    </span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">楼层总数</label>
                        <div class="col-md-6">
                            <input class="form-control" name="totalFloor" type="number">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">水电费类型</label>
                        <div class="col-md-6">
                            <select class="form-control" name="utilityBillType" options="utilityBillType">
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">水单价</label>
                        <div class="col-md-6">
                            <input class="form-control" name="waterUnitPrice" type="number">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">电单价</label>
                        <div class="col-md-6">
                            <input class="form-control" name="electricUnitPrice" type="number">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">公寓状态</label>
                        <div class="col-md-6">
                            <select class="form-control" name="status">
                                <option value=""></option>
                                <option value="1">正常</option>
                                <option value="0">异常</option>
                            </select>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary modelSave">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
        <!--展示地图-->
        <div class="map" style="display: none">
            <div id="container"
                 style="position: absolute;
                margin:-557px 500px;
                width: 600px;
                height: 550px;
                border: 1px solid grey;
                overflow:hidden;">
            </div>
            <div style="width:730px;margin:10px auto;">
                <span style="color: #FFFFFF">要查询的地址：</span><input id="text_" type="text" value="百度" style="margin-right:40px;"/>
                <span style="color: #FFFFFF">查询结果：</span><input id="result_" type="text" />
                <input type="button" value="查询" onclick="searchByStationName();"/>
                <input type="button" value="确认" onclick="getValues();">
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="dirDataModal" tabindex="-1" role="dialog" aria-labelledby="dirDataModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="dirDataModalLabel">新增目录</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal dir-form">
                    <input type="hidden" class="form-control" name="id">
                    <input type="hidden" name="directory" value="true">
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">目录编码</label>
                        <div class="col-md-6">
                            <input class="form-control" name="code" type="text" dol-validate="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">目录名称</label>
                        <div class="col-md-6">
                            <input class="form-control" name="name" type="text" dol-validate="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-offset-1 col-md-2 control-label">父目录ID</label>
                        <div class="col-md-6">
                            <input class="form-control" name="parent.id" type="text" disabled>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary dirModelSave">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="hDataModal" tabindex="-1" role="dialog" aria-labelledby="hDataModalLabel">
    <div class="modal-dialog" role="document" style="left: 12%;top: 0;width: 80%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="hDataModalLabel">新增房屋</h4>

            </div>
            <div class="modal-body" style="height: 100%;">
                <form class="form-horizontal house-form">
                    <input type="hidden" class="form-control" name="id" id="houseId">
                    <input type="hidden" class="form-control" name="apartment.id">
                    <ul class="nav nav-tabs" role="tablist" id="myTabs">
                        <li role="presentation" class="active">
                            <a href="#basicInfo" aria-controls="basicInfo" role="tab" data-toggle="tab">房屋基本信息</a>
                        </li>
                        <li role="presentation">
                            <a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">房屋长描述</a>
                        </li>
                        <li role="presentation">
                            <a href="#picture" aria-controls="picture" role="tab" data-toggle="tab">房屋图片</a>
                        </li>
                        <li role="presentation">
                            <a href="#bed" aria-controls="bed" role="tab" data-toggle="tab">床铺信息</a>
                        </li>
                        <li role="presentation">
                            <a href="#dayPrice" aria-controls="dayPrice" role="tab" data-toggle="tab">日租价格</a>
                        </li>
                    </ul>
                    <div class="tab-content" style="margin-top: 10px;">
                        <div role="tabpanel" class="tab-pane active" id="basicInfo">
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">房号</label>
                                <div class="col-md-6">
                                    <input class="form-control" name="houseNumber" type="text" dol-validate="required">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">房屋名称</label>
                                <div class="col-md-6">
                                    <input class="form-control" name="name" type="text" dol-validate="required">
                                </div>
                            </div>

                            <!--<div class="form-group">-->
                            <!--<label class="col-md-offset-1 col-md-2 control-label">房屋编码</label>-->
                            <!--<div class="col-md-6">-->
                            <!--<input class="form-control" name="code" id="houseCode" type="text" dol-validate="required">-->
                            <!--</div>-->
                            <!--</div>-->
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">所在楼层</label>
                                <div class="col-md-6">
                                    <input class="form-control" name="floor" type="tel" dol-validate="required">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">房屋地址</label>
                                <div class="col-md-6">
                                    <input class="form-control" name="address" type="tel" dol-validate="required">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">房型</label>
                                <div class="col-md-6">
                                    <select class="form-control" options="houseType"
                                            codeField="code" nameField="name" name="houseType"
                                            dol-validate="required"></select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">房型组</label>
                                <div class="col-md-6">
                                    <select class="form-control" options="roomGroup"
                                            codeField="code" nameField="name" name="houseGroup"
                                            dol-validate="required"></select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">房屋面积</label>
                                <div class="col-md-6">
                                    <input class="form-control" name="area" type="text" dol-validate="required">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">房屋月租</label>
                                <div class="col-md-6">
                                    <input class="form-control" name="monthly" type="tel" dol-validate="required">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">物业费</label>
                                <div class="col-md-6">
                                    <input class="form-control" name="propertyFee" type="tel" dol-validate="required">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">房屋描述</label>
                                <div class="col-md-6">
                                    <textarea name="shortDesc"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">房屋状态</label>
                                <div class="col-md-6">
                                    <select class="form-control" name="status">
                                        <option value=""></option>
                                        <option value="1">空房</option>
                                        <option value="2">已租赁</option>
                                        <option value="3">维修中</option>
                                        <option value="4">异常</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-offset-2 col-md-8">
                                    <label class="col-md-2 control-label" style="margin-left: -40px;">出租类型</label>
                                    <div class="col-md-3">
                                        <div class="checkbox" style="padding: 5px 0 0 0; display: inline-block">
                                            <label>
                                                <input type="checkbox" name="dayRentAble" id="houseDayRentAble">日租
                                            </label>
                                            <label>
                                                <input type="checkbox" name="monthRentAble" id="houseMonthRentAble">月租
                                            </label>
                                        </div>
                                    </div>
                                    <label class="col-md-2 control-label">可否加床</label>
                                    <div class="col-md-1">
                                        <div class="checkbox" style="padding: 5px 0 0 0;">
                                            <label>
                                                <input type="checkbox" name="addBedAble" id="houseAddBedAble">
                                            </label>
                                        </div>
                                    </div>
                                    <label class="col-md-2 control-label">推荐房源</label>
                                    <div class="col-md-1">
                                        <div class="checkbox" style="padding: 5px 0 0 0;">
                                            <label>
                                                <input type="checkbox" name="recommend" id="houseRecommend">
                                            </label>
                                        </div>
                                    </div>
                                </div>



                            </div>
                            <div class="form-group">

                            </div>
                            <div class="form-group">

                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">管家</label>
                                <div class="col-md-6">
                                    <select id="manager_select" class="form-control"
                                            options
                                            optionUrl="/api/8f7def63cc5845468b2c65a69abb0664"
                                            ajaxType="post"
                                            optionParam='{ "properties" : { "userType" : "1" }}'
                                            codeField="id" nameField="name" name="manager"></select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-offset-1 col-md-2 control-label">负责人</label>
                                <div class="col-md-6">
                                    <select id="manager_select" class="form-control"
                                            options
                                            optionUrl="/api/756af3ae31a64565a54ec0221f84d377"
                                            ajaxType="post"
                                            optionParam='{ "properties" : { "pageSize" : 1000 }}'
                                            codeField="id" nameField="name" name="account"></select>
                                </div>
                            </div>
                        </div>

                        <div role="tabpanel" class="tab-pane" id="profile">
                            <div>
                                <script type="text/plain" id="myEditor" style="width:1000px;height:240px;"></script></div>
                        </div>
                        <div role="tabpanel" class="tab-pane" id="picture">

                            <div class="row">
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择1</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="a">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="aImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="aimage" type="hidden" id="aImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择2</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="b">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="bImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="bimage" type="hidden" id="bImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择3</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="c">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="cImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="cimage" type="hidden" id="cImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row" style="margin-top: 5px;border-top: 1px solid;padding-top: 5px;">
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择4</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="d">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="dImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="dimage" type="hidden" id="dImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择5</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="e">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="eImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="eimage" type="hidden" id="eImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择6</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="f">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="fImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="fimage" type="hidden" id="fImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row" style="margin-top: 5px;border-top: 1px solid;padding-top: 5px;">
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择7</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="g">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="gImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="gimage" type="hidden" id="gImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择8</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="h">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="hImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="himage" type="hidden" id="hImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择9</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="i">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="iImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="iimage" type="hidden" id="iImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row" style="margin-top: 5px;border-top: 1px solid;padding-top: 5px;">
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择10</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="j">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="jImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="jimage" type="hidden" id="jImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择11</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="k">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="kImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="kimage" type="hidden" id="kImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="img-form">
                                        <span class="btn btn-success fileinput-button"><i
                                                    class="glyphicon glyphicon-plus"></i>
                                        <span>图片选择12</span>
                                        <input class="fileupload" type="file" name="upfile" multiple>
                                        </span>
                                        <span class="btn btn-danger fileinput-del-btn" data-ind="l">
                                            <i class="glyphicon glyphicon-remove"></i>
                                        </span>
                                        <div style="width: 150px;">
                                            <img src="/page/images/house_default.png" id="lImage"
                                                 style="width: 100%;height: 100%;display: block;"
                                                 class="imageShowBody"/>
                                            <input name="limage" type="hidden" id="lImageInput" class="image-name">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div role="tabpanel" class="tab-pane" id="bed">
                            <div id="bedList"></div>
                        </div>
                        <div role="tabpanel" class="tab-pane" id="dayPrice">
                            <div id="dayPriceList"></div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary hModelSave">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="prdDataModal" tabindex="-1" role="dialog" aria-labelledby="prdDataModalLabel">
    <div class="modal-dialog" role="document" style="top: 1%;left: 25%;width: 50%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="prdDataModalLabel">房屋资产</h4>
            </div>
            <div class="modal-body">
                <form class=".prod-form">
                    <div id="productList"></div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-warning addProduct">添加资产</button>
                <button type="button" class="btn btn-primary saveProduct">保存</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="addPrdDataModal" tabindex="-1" role="dialog" aria-labelledby="addPrdDataModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="addPrdDataModalLabel"></h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <div class="row" style="padding: 10px 20px;">
                        <div class="input-group">
                            <input class="form-control" name="skuId" id="skuId" type="text" placeholder="输入编码，自动联想"
                                   autocomplete="off">
                            <div class="input-group-btn" style="">
                                <button style="height: 32px;width: 20px;" type="button"
                                        class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                    <span class="caret" style="margin-left: 2px;margin-bottom: 9px;"></span>
                                </button>
                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div>

<% include ../common/footer.ejs %>
<script src="<%= global.config.publicPath %>/jquery-file-upload/js/vendor/jquery.ui.widget.js"></script>
<script src="<%= global.config.publicPath %>/jquery-file-upload/js/jquery.fileupload.js"></script>
<script src="//cdn.bootcss.com/bootstrap-datepicker/1.6.1/js/bootstrap-datepicker.min.js"></script>
<script src="<%= global.config.publicPath %>/uedit/umeditor.config.js"></script>
<script src="<%= global.config.publicPath %>/uedit/umeditor.min.js"></script>
<script src="<%= global.config.publicPath %>/uedit/lang/zh-cn/zh-cn.js"></script>
<script src="<%= global.config.publicPath %>/bootstrap/bootstrap-suggest.js"></script>

<script>
    $(function () {
        yams.page.um = UM.getEditor('myEditor', {
            imageUrl: "<%= global.config.contextPath == '/' ? '' : global.config.contextPath %>/file/"
            , imagePath: "/uploadFiles"
            , imageFieldName: "upfile"
            , initialFrameWidth: '100%'
            , initialFrameHeight: 420
            , autoHeightEnabled: false
        });
        $('.fileupload').fileupload({
            url: '<%= global.config.contextPath == '/' ? '' : global.config.contextPath %>/file/',
            dataType: 'json',
            done: function (e, data) {
                console.log($(e.target).closest('.img-form'));
                var p = $(e.target).closest('.img-form');
                p.find('.imageShowBody').attr("src", '/uploadFiles' + data.result.url).show();
                p.find('.image-name').val(data.result.url);
            },
            progressall: function (e, data) {
            }
        });
        $('#address').focus(function () {
            $('.map').css({"display":"block"})
        })
    });
</script>


<script type="text/javascript">
    var map = new BMap.Map("container");
    map.centerAndZoom("杭州", 12);
    map.enableScrollWheelZoom();    //启用滚轮放大缩小，默认禁用
    map.enableContinuousZoom();    //启用地图惯性拖拽，默认禁用
    map.addControl(new BMap.NavigationControl());  //添加默认缩放平移控件
    map.addControl(new BMap.OverviewMapControl()); //添加默认缩略地图控件
    map.addControl(new BMap.OverviewMapControl({ isOpen: true, anchor: BMAP_ANCHOR_BOTTOM_RIGHT }));
    var localSearch = new BMap.LocalSearch(map);
    localSearch.enableAutoViewport(); //允许自动调节窗体大小
    function searchByStationName() {
        map.clearOverlays();//清空原来的标注
        var keyword = document.getElementById("text_").value;
        localSearch.setSearchCompleteCallback(function (searchResult) {
            var poi = searchResult.getPoi(0);
            document.getElementById("result_").value = poi.point.lng + "," + poi.point.lat;
            map.centerAndZoom(poi.point, 13);
            var marker = new BMap.Marker(new BMap.Point(poi.point.lng, poi.point.lat));  // 创建标注，为要查询的地址对应的经纬度
            map.addOverlay(marker);
            var content = document.getElementById("text_").value + "<br/><br/>经度：" + poi.point.lng + "<br/>纬度：" + poi.point.lat;
            var infoWindow = new BMap.InfoWindow("<p style='font-size:14px;'>" + content + "</p>");
            marker.addEventListener("click", function () {
                this.openInfoWindow(infoWindow); });
            marker.setAnimation(BMAP_ANIMATION_BOUNCE);
            //跳动的动画
            });
        localSearch.search(keyword);

    }
    function getValues() {
        //赋值
        var searchAddress=$('#text_').val();
        console.log(searchAddress);
        $('#address').val(searchAddress);
        console.log("address:"+$('#address').val());
        var getlngAndLat=$('#result_').val();
        console.log(getlngAndLat);
        $('#lngAndLat').val(getlngAndLat);
        console.log("lngAndLat:"+$('#lngAndLat').val());
        $('.map').css({"display":"none"})
    }
</script>


<!--<script type="text/javascript">
    // 百度地图API功能
    $('.newData').click(function () {
        //浏览器定位
        var geolocation = new BMap.Geolocation();
        var gc = new BMap.Geocoder();
        geolocation.getCurrentPosition(function (r) {
            if (this.getStatus() == BMAP_STATUS_SUCCESS) {
                var map = new BMap.Map("l-map");
                map.centerAndZoom(r.point, 12); //定义地图等级，就是放大倍数
                map.enableScrollWheelZoom(true); //启用地图滚轮放大缩小
                var marker = new BMap.Marker(r.point);// 创建标注
                map.addOverlay(marker);  // 将标注添加到地图中
                map.panTo(r.point);
                marker.enableDragging(); //标注可拖拽
                // 开启事件监听
                marker.addEventListener("dragend", function (e) {

                    var x = e.point.lng; //经度
                    var y = e.point.lat; //纬度
                    r.point=e.point;
                    $('#addressName').val('');
                    gc.getLocation(r.point, function(rs){

                        var addComp = rs.addressComponents;
                        $('#addressName').val(addComp.province + "-" + addComp.city + "-" + addComp.district + "-" + addComp.street + "-" + addComp.streetNumber);
                    });
                });

            }
            else {
                alert('failed' + this.getStatus());
            }
            gc.getLocation(r.point, function(rs){

                var addComp = rs.addressComponents;
                $('#addressName').val(addComp.province + "-" + addComp.city + "-" + addComp.district + "-" + addComp.street + "-" + addComp.streetNumber);
            });
        }, { enableHighAccuracy: true })
    });

</script>-->
</body>
</html>

